package com.heima.user;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;

/**
 * @Author ZhangXiXi
 * @Description TODO
 * @date 2021/2/20 11:04
 * @Version 1.0
 */

@SpringBootApplication
@MapperScan("com.heima.user.mapper")
@EnableDiscoveryClient  //开启注册中心
@EnableFeignClients(basePackages = "com.heima.apis")//只要是com.heima.apis包里面所有提供的接口,都可以直接注入到user里面所有的管理的类,即service
public class UserApplication {
    public static void main(String[] args) {
        SpringApplication.run(UserApplication.class,args);
    }
    @Bean
//    @ConfigurationProperties(prefix = "mybatis")
    public PaginationInterceptor paginationInterceptor(){
        return new PaginationInterceptor();
    }
}
